package cn.tedu.jws.admin.mapper;


import cn.tedu.jws.admin.pojo.entity.Building;
import cn.tedu.jws.admin.pojo.vo.BuildingListVO;
import cn.tedu.jws.admin.pojo.vo.BuildingStandardVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @version 0.0.1
 * @Author cn.tedu
 * @Date 2023/03/25/14:39
 */
@Repository
public interface BuldingsMapper {

    int insert(Building building);

    int countByDongElementRoomNumber(@Param("dong") Integer dong,@Param("element") Integer element, @Param("roomNumber") Integer roomNumber);

    int deleteById(Long id);

    BuildingStandardVO getStandardById(Long id);

    int update(Building building);

    int countByDongElementRoomNumberAndNotId(@Param("id") Long id, @Param("dong") Integer dong, @Param("element") Integer element, @Param("roomNumber") Integer roomNumber);

    List<BuildingListVO> list();

    List<BuildingListVO> listByDongList(Integer dong);

    List<BuildingListVO> listByNum(String num);
}
